package com.resourcestore.dao;

import java.util.List;

import com.resourcestore.dao.BaseDao;
import com.resourcestore.model.Operations;
import com.resourcestore.model.Roles;
import com.resourcestore.utils.tag.Pagination;

public class RolesDao extends BaseDao {

	public List<Roles> selectRoles(){
		List<Roles> list=this.queryForList("selectRoles");
		return list;
	}
	
	public List<Roles> selectRolesPage(Roles roles,Pagination pagination){
		List<Roles> list = this.queryForPage("selectRolesPage", roles,pagination);
		return list;
	}
	
	public int queryRolesNum(Roles roles) {
		return this.queryNum("selectRolesCount", roles);
	}
	
	public Roles selectRolesById(Roles roles){
		return (Roles)this.queryForObject("selectRolesById", roles);
	}
	
	public void insertRoles(Roles roles){
		this.insert("insertRoles", roles);		
	}
	
	public void updateRoles(Roles roles){
		this.update("updateRoles", roles);	
	}
	
	public void deleteRoles(Roles roles){
		this.delete("deleteRoles", roles);
	}
	
	public void deleteMoreRoles(Roles roles){
		this.delete("deleteMoreRoles", roles);
	}
}
